import request from '@/utils/request'

//预添加
export function prepareAdd(data) {
  return request({
    url: '/project/templete/prepare/add',
    method: 'post',
    data: data
  })
}


//提交模板
export function add(data) {
  return request({
    url: '/project/templete/add',
    method: 'post',
    data: data
  })
}


//添加节点
export function addNode(data) {
  return request({
    url: '/project/templete/add/node',
    method: 'post',
    data: data
  })
}

//修改节点
export function updateNode(data) {
  return request({
    url: '/project/templete/update/node',
    method: 'post',
    data: data
  })
}

//删除节点
export function delNode(data) {
  return request({
    url: '/project/templete/del/node',
    method: 'post',
    data: data
  })
}



//查询模板列表
export function getProjectTempleteList(data) {
  return request({
    url: '/project/templete/list',
    method: 'get',
    query: data
  })
}

//模板详情
export function getProjectTempleteDetail(data) {
  return request({
    url: '/project/templete/detail',
    method: 'get',
    params: data
  })
}

//当前模板详情
export function getProjectCurrTempleteDetail(data) {
  return request({
    url: '/project/templete/curr/temDetail',
    method: 'get',
    params: data
  })
}


//复制模板
export function copyTemplete(data) {
  return request({
    url: '/project/templete/copy',
    method: 'post',
    data: data
  })
}


//设置成当前版本
export function updateStatus(id) {
  return request({
    url: '/project/templete/updateStatus?id='+id,
    method: 'get'
  })
}



 